Skip to content

feat(instructions): load user-level OpenCode, Codex, and Claude guidance - #1932

Merged
limityan merged 1 commit into
GCWing:mainfrom
limityan:yanzhn/user-instruction-sources
Jul 31, 2026
Merged

feat(instructions): load user-level OpenCode, Codex, and Claude guidance#1932
limityan merged 1 commit into
GCWing:mainfrom
limityan:yanzhn/user-instruction-sources

Conversation

@limityan

Copy link
Copy Markdown
Collaborator

Summary

  • add runtime-free user Instruction source adapters for OpenCode, Codex, and Claude Code
  • compose user guidance before existing project Instructions with canonical-path deduplication
  • keep local user roots isolated from Remote workspaces and preserve the injected project filesystem owner
  • add bounded traversal, file/content budgets, cache recovery, and redacted prompt labels

Compatibility slice

  • OpenCode: global AGENTS.md with Claude fallback, native global config override order, and bounded local exact/glob instructions
  • Codex: $CODEX_HOME/AGENTS.override.md with empty-file fallback to AGENTS.md; plugin caches are not scanned
  • Claude Code: user CLAUDE.md, config-root-contained imports, and unconditional user rules
  • /reload instructions continues to invalidate the Session user-context cache; no watcher is introduced

Architecture and safety

  • ecosystem precedence stays in sibling adapters
  • reusable bounded local reads stay in services-core
  • Product Assembly owns cross-ecosystem order, failure isolation, cacheability, and final prompt composition
  • user and project sources share a final 256-file / 2 MiB rendered budget
  • Remote workspaces only consume project sources through WorkspaceFileSystem; controller-local user roots are never consulted
  • no Plugin Host Runtime dependency, shim, execution path, package cache, network fetch, or generic extension graph is added

Validation

  • cargo test -p bitfun-opencode-adapter instruction_source (11 passed)
  • cargo test -p bitfun-codex-adapter instruction_source (2 passed)
  • cargo test -p bitfun-claude-code-adapter instruction_source (6 passed)
  • cargo test -p bitfun-services-core local_instructions (3 passed)
  • cargo test -p bitfun-core instruction (20 passed)
  • node scripts/check-core-boundaries.mjs
  • pnpm run check:repo-hygiene
  • cargo check --workspace --exclude bitfun-desktop
  • git diff gcwing/main...HEAD --check

The full Desktop workspace check still requires the generated src/mobile-web/dist asset that is absent from this checkout; no placeholder build artifact was created.

Compose bounded OpenCode, Codex, and Claude Code user instructions ahead of project sources while preserving remote workspace isolation and cache recovery semantics.
@limityan
limityan merged commit 7c769dc into GCWing:main Jul 31, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant